package edu.gatech.oad.antlab.m7final;

/**
 * This is the TrailNode Class
 * This class contains the node for a location along the trail, which is contained in a linked list in the
 * TrailNavigator class.
 * @author Chris Adams
 * @version 1.0 11/4/2011
 */

public class TrailNode {
	
	private String location;
	private int milesToNext;
	private boolean isEndOfJourney, isRiver, hasStore, isDestination;
	
	
	//TrailNode constructor
	public TrailNode(String location, int milesToNext, boolean isEndOfJourney, boolean isRiver, boolean hasStore, boolean isDestination){
		this.location = location;
		this.milesToNext = milesToNext;
		this.isEndOfJourney = isEndOfJourney;
		this.isRiver = isRiver;
		this.hasStore = hasStore;
		this.isDestination = isDestination;
	}
	
	//Returns current location
	public String getLocation(){
		return location;
	}
	
	//Returns miles to next destination
	public int getMilesToNext(){
		return milesToNext;
	}
	
	//Updates miles to next location after a stop
	public void updateMilesToNext(int milesTraveled){
		milesToNext = milesToNext - milesTraveled;
	}
	
	//Returns boolean indicating if Journey is over
	public boolean getIsEndOfJourney(){
		return isEndOfJourney;
	}
	
	//Returns boolean indicating if river is present at stop
	public boolean getIsRiver(){
		return isRiver;
	}
	
	//Returns boolean indicating if store is at location
	public boolean getHasStore(){
		return hasStore;
	}
	
	//Returns boolean indicating if destination has been reached
	public boolean getIsDestination(){
		return isDestination;
	}
}